package com.zdj.presentation.base;

import android.databinding.ObservableBoolean;
import android.view.View;

/**
 * Created by zdj on 16-6-4.
 */

public abstract class BaseLoadingViewModel<T extends BaseActivity> extends BaseViewModel{

    public final ObservableBoolean showRetry = new ObservableBoolean(false);
    public final ObservableBoolean showLoading = new ObservableBoolean(false);

    public BaseLoadingViewModel(T t) {
        super(t);
    }

    @BindView
    public void showLoading() {
        showRetry.set(false);
        showLoading.set(true);
    }

    @BindView
    public void showRetry() {
        showLoading.set(false);
        showRetry.set(true);
    }

    public abstract View.OnClickListener onRetryClick();
}
